<template>
  <el-row>
    <el-col :span="24" class="mt5">
      <el-descriptions :column="2">
        <el-descriptions-item>
          <template #label>
            <descriptions-item-label label="商品名称" />
          </template>
          {{ data?.productName }}
        </el-descriptions-item>
        <el-descriptions-item>
          <template #label>
            <descriptions-item-label label="商品类型" />
          </template>
          {{ data?.productTypeName }}
        </el-descriptions-item>
        <el-descriptions-item>
          <template #label>
            <descriptions-item-label label="所属商家" />
          </template>
          {{ data?.merchantName }}
        </el-descriptions-item>
        <el-descriptions-item>
          <template #label>
            <descriptions-item-label label="地址" />
          </template>
          {{ data?.address }}
        </el-descriptions-item>
        <el-descriptions-item>
          <template #label>
            <descriptions-item-label label="供货价(元)/总" />
          </template>
          {{ data?.supplyPrice }}
        </el-descriptions-item>
        <el-descriptions-item>
          <template #label>
            <descriptions-item-label label="平台售价(元)/人" />
          </template>
          {{ data?.platformPrice }}
        </el-descriptions-item>
        <el-descriptions-item>
          <template #label>
            <descriptions-item-label label="商品介绍" />
          </template>
          {{ data?.productIntroduct }}
        </el-descriptions-item>
        <el-descriptions-item>
          <template #label>
            <descriptions-item-label label="创建时间" />
          </template>
          {{ formatDate(data?.createTime) }}
        </el-descriptions-item>
      </el-descriptions>
    </el-col>
  </el-row>
</template>
<script setup lang="ts">
import { formatDate } from '@/utils/formatTime'

const { data } = defineProps<{ data }>()
</script>
<style scoped lang="scss">
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
</style>
